package com.tarena.luban.demo.rocket.consumer;

import com.tarena.luban.demo.rocket.bean.User;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        topic="rocket-topic-02",
        consumerGroup = "gg2",
        selectorExpression = "*"
)
public class UserConsumer01 implements RocketMQListener<User> {
    @Override
    public void onMessage(User user) {
        System.out.println(user);
    }
}
